import { IParam } from '@/core';
import { Sys_component_apiServiceBase } from './sys-component-api-service-base';

/**
 * 组件使用接口服务
 * 基于template/src/api/{{appEntities}}/data-service/{{appEntities}}-service.ts.hbs生成
 *
 * @export
 * @class Sys_component_apiService
 * @extends Sys_component_apiServiceBase
 */
export class Sys_component_apiService extends Sys_component_apiServiceBase {
	/**
	 * 基础数据服务实例
	 *
	 * @private
	 * @type { Sys_component_apiService }
	 * @memberof Sys_component_apiService
	 */
	private static basicDataServiceInstance: Sys_component_apiService;

	/**
	 * 数据服务存储Map对象
	 *
	 * @private
	 * @type {Map<string, any>}
	 * @memberof Sys_component_apiService
	 */
	private static dataServiceMap: Map<string, any> = new Map();

	/**
	 * Creates an instance of Sys_component_apiService.
	 * @memberof Sys_component_apiService
	 */
	constructor(opts?: IParam) {
		super(opts);
	}

	/**
	 * 获取实例
	 *
	 * @static
	 * @param 应用上下文
	 * @return {*}  { Sys_component_apiService }
	 * @memberof Sys_component_apiService
	 */
	static getInstance(opts?: IParam): Sys_component_apiService {
		if (!this.basicDataServiceInstance) {
			this.basicDataServiceInstance = new Sys_component_apiService(opts);
		}
		return this.basicDataServiceInstance;
	}
}
export default Sys_component_apiService;
